-- phpMyAdmin SQL Dump
-- version 2.6.1-rc2
-- http://www.phpmyadmin.net
-- 
-- Host: localhost
-- Generation Time: May 06, 2005 at 04:11 PM
-- Server version: 4.1.8
-- PHP Version: 4.3.10
-- 
-- Database: `mates`
-- 

-- --------------------------------------------------------

-- 
-- Table structure for table `courses`
-- 

CREATE TABLE `courses` (
  `user_id` int(11) NOT NULL default '0',
  `course` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`user_id`,`course`),
  KEY `course` (`course`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `friends`
-- 

CREATE TABLE `friends` (
  `user_id` int(11) NOT NULL default '0',
  `friend_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`user_id`,`friend_id`),
  KEY `friend_id` (`friend_id`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `in_loc`
-- 

CREATE TABLE `in_loc` (
  `user_id` int(11) NOT NULL default '0',
  `loc_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`user_id`),
  KEY `loc_id` (`loc_id`)
) ENGINE=HEAP DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `interests`
-- 

CREATE TABLE `interests` (
  `user_id` int(11) NOT NULL default '0',
  `interest` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`user_id`,`interest`),
  KEY `interest` (`interest`),
  KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `ips`
-- 

CREATE TABLE `ips` (
  `ip` varchar(15) NOT NULL default '',
  `user_id` int(11) NOT NULL default '0',
  `loc_id` int(11) NOT NULL default '0',
  `count` int(11) NOT NULL default '0',
  `lastused_ts` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`ip`,`user_id`,`loc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `loc_queue`
-- 

CREATE TABLE `loc_queue` (
  `session_id` varchar(10) NOT NULL default '',
  `name` varchar(50) NOT NULL default '',
  `loc_id` int(11) NOT NULL default '0',
  `msg_type` varchar(10) NOT NULL default '',
  `lat` float NOT NULL default '0',
  `long` float NOT NULL default '0',
  `distance` float NOT NULL default '0',
  `direction` float NOT NULL default '0',
  `wall` varchar(255) NOT NULL default '',
  `ts` datetime NOT NULL default '0000-00-00 00:00:00'
) ENGINE=HEAP DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `loc_rel`
-- 

CREATE TABLE `loc_rel` (
  `loc_id` int(11) NOT NULL default '0',
  `neighbor_id` int(11) NOT NULL default '0',
  `distance` float NOT NULL default '0',
  `direction` float NOT NULL default '0',
  PRIMARY KEY  (`loc_id`,`neighbor_id`),
  KEY `neighbor_id` (`neighbor_id`),
  KEY `loc_id` (`loc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `locs`
-- 

CREATE TABLE `locs` (
  `loc_id` int(11) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL default '',
  `lat` float NOT NULL default '0',
  `long` float NOT NULL default '0',
  PRIMARY KEY  (`loc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=66 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `mac_addrs`
-- 

CREATE TABLE `mac_addrs` (
  `mac_addr` varchar(17) NOT NULL default '',
  `user_id` int(11) NOT NULL default '0',
  `loc_id` int(11) NOT NULL default '0',
  `count` int(11) NOT NULL default '0',
  `lastused_ts` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`mac_addr`,`user_id`,`loc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `msg_queue`
-- 

CREATE TABLE `msg_queue` (
  `session_id` varchar(10) NOT NULL default '',
  `username` varchar(8) NOT NULL default '',
  `msg` varchar(255) NOT NULL default '',
  `ts` datetime NOT NULL default '0000-00-00 00:00:00'
) ENGINE=HEAP DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `rel_queue`
-- 

CREATE TABLE `rel_queue` (
  `session_id` varchar(10) NOT NULL default '',
  `username` varchar(8) NOT NULL default '0',
  `loc_id` int(11) NOT NULL default '0',
  `msg_type` varchar(10) NOT NULL default '',
  `rel_type` varchar(10) NOT NULL default '',
  `rel_param` varchar(255) NOT NULL default '',
  `ts` datetime NOT NULL default '0000-00-00 00:00:00'
) ENGINE=HEAP DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `userinfo`
-- 

CREATE TABLE `userinfo` (
  `user_id` int(11) NOT NULL default '0',
  `message` varchar(255) NOT NULL default '',
  `lastupdated_ts` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

-- 
-- Table structure for table `users`
-- 

CREATE TABLE `users` (
  `user_id` int(11) NOT NULL auto_increment,
  `username` varchar(15) NOT NULL default '',
  `password` varchar(20) NOT NULL default '',
  `session_id` varchar(10) NOT NULL default '',
  `lastreq_ts` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`user_id`),
  KEY `session_id` (`session_id`),
  KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6753 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `walls`
-- 

CREATE TABLE `walls` (
  `loc_id` int(11) NOT NULL default '0',
  `message` varchar(255) NOT NULL default '',
  `lastupdated_user_id` int(11) NOT NULL default '0',
  `lastupdated_ts` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`loc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
